package cars;

public class Trunk extends Vehicle {
    private int Tonnage;
    //载重

    public Trunk() {
    }

    //无参构造
    public Trunk(String type, String brand, int tonnage, String vehicleID, double perRent) {
        super(type, brand, vehicleID, perRent);
        Tonnage = tonnage;
    }
    //有参构造方法

    public int getTonnage() {
        return Tonnage;
    }
    //获取载重

    public void setTonnage(int tonnage) {
        Tonnage = tonnage;
    }
    //设置载重


    @Override
    public double calRent(int day) {
        return super.calRent(day);
    }
    //计算租金

    public String toString() {
        return getType() + " " + getBrand() + " " + Tonnage + " " + getVehicleID() + " " + getPerRent();
    }
    //以空格符返回信息
}
